package com.zetxek.meteogalicia.datasets;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;

public class Localidad {
	private String title;
	private URL link;
	private String description;
	private ArrayList<Prediccion> predicciones = new ArrayList<Prediccion>();

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public URL getLink() {
		return link;
	}

	public void setLink(String link) {
		try {
			this.link = new URL(link);
		} catch (MalformedURLException e) {
			throw new RuntimeException(e);
		}
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public ArrayList<Prediccion> getPredicciones() {
		return predicciones;
	}

	public void setPredicciones(ArrayList<Prediccion> predicciones) {
		this.predicciones = predicciones;
	}

	public String toString() {
		return "Title = " + this.title + "\nLink = " + this.link
				+ "\nDescription = " + this.description;
	}
}